def sum(x):
  a=str(x)
  total=0
  for i in a:
    total=int(i)+total
  return total






n=input()
print(sum(n))
